/*
   @Copyright:LibreOJ
   @Author:   tjyemail
   @Problem:  https://loj.ac/problem/7
   @Language: C++
   @Datetime: 20-07-31 13:07
   */
// mmap; time 135ms
#include <bits/stdc++.h>
using namespace std;
#include <sys/mman.h>

typedef unsigned long long _FR_TYPE;
struct _FR {
	char *buf, *idx;
	size_t size;
	_FR_TYPE num;
	_FR(size_t _size):size(_size) {
		buf = idx = (char*)mmap(0, size, PROT_READ, MAP_PRIVATE, fileno(stdin), 0);
	}
	inline _FR_TYPE read() {
		for (num=0; !isdigit(*idx); ++idx);
		for (; isdigit(*idx); ++idx)
			num = num * 10 + *idx - '0';
		return num;
	}
	~_FR() {munmap(buf, size);}
} fr(21*3000000);

int main() {
	_FR_TYPE ans = 0;
	for (int n = 3000000; n--; ans ^= fr.read());
	printf("%lld\n", ans);
	return 0;
}
